﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class setSwitch : MonoBehaviour
{
    private static bool flag;
    public Canvas setting;
    public AudioClip tapClip;

    public void SettingSwitch()
    {
        if(!flag)
        {
            this.GetComponent<AudioSource>().PlayOneShot(tapClip);
            setting.GetComponent<Canvas>().enabled = true;
            flag = true;
        }
    }

    public void CloseWindow()
    {
        setting.GetComponent<Canvas>().enabled = false;
        flag = false;
    }

    public void ExitGame()
    {
        Application.Quit();
    }
}
